/**
 * 
 */
package bingo.validation;

/**
 * 表示一个校验结果
 */
public class ValidationResult {

	protected boolean isPass;
	
	protected String message;
	
	/** 验证失败的对象的class的simplename */
	protected String beanName;
	
	/** 验证失败的属性的名称 */
	protected String fieldName;
	
	public static ValidationResult pass(){
		return new ValidationResult(true);
	}
	
	public static ValidationResult notPass(String message){
		return new ValidationResult(false,message);
	}	
	
	public ValidationResult(){
		;
	}
	
	public ValidationResult(boolean isPass){
		this.isPass = isPass;
	}
	
	public ValidationResult(boolean isPass,String message){
		this(isPass);
		this.message = message;
	}

	public boolean isPass() {
		return isPass;
	}

	public void setPass(boolean isPass) {
		this.isPass = isPass;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public String getBeanName() {
		return beanName;
	}

	public void setBeanName(String beanName) {
		this.beanName = beanName;
	}

	public String getFieldName() {
		return fieldName;
	}

	public void setFieldName(String fieldName) {
		this.fieldName = fieldName;
	}
}
